#pragma once

#include <fcntl.h>
#include "log.hpp"

using namespace Logspace;

void SetNonBlock(int fd)
{
    int fl = fcntl(fd , F_GETFL);
    fl |= O_NONBLOCK;

    if(fcntl(fd , F_SETFL , fl) < 0)
    {
        Log(Info) << "fcntl error";
    }
}